package com.szrt.java.day20161226.demo13;

public class ClassTest {

	public static void main(String[] args) {
		
		int[] array ={1,2,3,4,5};
		
		int result = dg(array);
		System.out.println(result);
		
	}
	
	public static int dg(int... args){
		int temp = args.length;
		
		if(temp>=0){
			return args[temp]+dg(temp-1);
		}
		return temp;
	}
	
}
